﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BLL;
public partial class uc_hotnews : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {        
        if (!IsPostBack)
        {
            int totalItem = 0;
            if (Session["Cart"] != null)
            {
                totalItem = ((System.Data.DataTable)Session["Cart"]).Rows.Count;
            }

            string LoginName = "Guest";
            bool isLogin = false;
            if (Session["Khach"] != null)
            {
                LoginName = Session["Khach"].ToString();
                isLogin = true;
            }

            ltHotNews.Text = new CmsBLL().RenderHotNews(CommonBLL.SiteID, totalItem,LoginName,isLogin);
        }
    }    
}